<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
<head>
    <title>TODO supply a title</title>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<div style="padding: 15px;">

    <table class="table table-bordered">
        <tr>
            <td colspan="4">订单编号：<?php echo ($order['orderid']); ?></td>
        </tr>
        <tr>
            <td>司机姓名电话</td>
            <td><?php echo ($xm['xingming']); ?>--<?php echo ($xm['dianhua']); ?></td>
            <td>乘客电话</td>
            <td><?php echo ($order['mobile']); ?></td>
        </tr>
        <tr>
            <td>出发地</td>
            <td><?php echo ($order['start']); ?></td>
            <td>目的地</td>
            <td><?php echo ($order['end']); ?></td>
        </tr>
        <tr>
            <td>下单时间</td>
            <td><?php echo (date('Y-m-d H:i:s',$order['addtime'])); ?></td>
            <td>出发时间</td>
            <td><?php echo ($order['starttime']); ?></td>
        </tr>
        <tr>
            <td>人数</td>
            <td>成人：<?php echo ($order['num']); ?>人;</td>
            <td>金额</td>
            <td><?php echo ($order['price']); ?></td>
        </tr>
        <tr>
            <td>支付状态</td>
            <td>
                <?php if($order['pay_statu'] == '0'): ?>未支付
                    <?php elseif($order['pay_statu'] == '1'): ?>
                    已支付
                     <?php if($order['pay_status_sk'] == '0'): ?>【线上支付】<?php else: ?>【现金支付】<?php endif; ?>
                    <?php elseif($order['pay_statu'] == '999'): ?>
                    <font color="red">已退款</font><?php endif; ?>
            </td>
            <td>订单类型</td>
            <td><?php echo ($order['fs']); ?></td>
        </tr>
        <!-- <tr>
            <td>收货人姓名</td>
            <td><?php echo ($order['xingming']); ?></td>
            <td>收货人电话</td>
            <td><?php echo ($order['dianhua']); ?></td>
        </tr> -->
        <tr>
            <td>备注</td>
            <td><?php echo ($order['crc']); ?></td>
            <!-- <td>航班</td> -->
            <td><?php echo ($order['hangban']); ?></td>
        </tr>

        <tr>
            <td>平台服务费</td>
            <td><?php echo ($order['tixianfeilv']); ?></td>

            <td>司机实际收益</td>
            <td><?php echo ($order['practical']); ?></td>
        </tr>

        <?php if($order['status'] == 7): ?><tr>
                <td>收款人姓名</td>
                <td><?php echo ($order['saveinfo']['name']); ?></td>

                <td>收款人手机号</td>
                <td><?php echo ($order['saveinfo']['mobile']); ?></td>
            </tr>

            <tr>
                <td>收款人银行卡号</td>
                <td><?php echo ($order['saveinfo']['card']); ?></td>
            </tr><?php endif; ?>
        <!-- <?php if($order['pay_statu'] != '0'): ?><tr>
            <td>退款</td>
            <td colspan="3">请输入退款金额:<input type="text" id="tk_price" value=""><a onclick="tuikuan(<?php echo ($payinfo['id']); ?>)">退款</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;已退款金额<?php echo ($order['tk_price']); ?></td>

        </tr><?php endif; ?> -->
    </table>
</div>
<script>
    function tuikuan(id) {
        if(confirm("退款操作不可逆？确认操作吗"))
        {


        var price=$('#tk_price').val();
        $.ajax({
            type: "POST",
            url: "/admin.php/order/tuikuan",

            cache: false,
            dataType: "json",
            async: false,
            data: {
                id: id,
                price:price
            },

            success: function (data) {
                alert(data);
                ////
            }


        });
        }else{
            return false;
        }
    }
</script>
</body>
</html>